import request from '@/utils/request'

// 查询规律段列表
export function listSegment(query) {
  return request({
    url: '/hmk/segment/list',
    method: 'get',
    params: query
  })
}

export function getSegmentSimpleList(query) {
  return request({
    url: '/hmk/segment/simpleList',
    method: 'get',
    params: query
  })
}


// 查询规律段详细
export function getSegment(id) {
  return request({
    url: '/hmk/segment/' + id,
    method: 'get'
  })
}

// 新增规律段
export function addSegment(data) {
  return request({
    url: '/hmk/segment',
    method: 'post',
    data: data
  })
}

// 修改规律段
export function updateSegment(data) {
  return request({
    url: '/hmk/segment',
    method: 'put',
    data: data
  })
}

// 删除规律段
export function delSegment(id) {
  return request({
    url: '/hmk/segment/' + id,
    method: 'delete'
  })
}
